package com.stlm2.dems.user.entity;

/**
 * Created by apple on 2017/5/23.
 */
public enum AccountType {
    Customer(1) {
        public String toString() {
            return "普通用户";
        }
    },
    Merchant(2) {
        public String toString() {
            return "商户";
        }
    };

    private final int val;

    AccountType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static AccountType getByIntValue(int n) {
        switch (n) {
            case 1:
                return Customer;
            case 2:
                return Merchant;

            default:
                return null;
        }
    }
}
